package cn.wolfcode.trip.base.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.Date;
import java.util.List;

/**
 * 评论树实体类
 */
@Getter
@Setter
@ToString
public class CommentTreeVo {
    private Long id;
    private Long userId;//第一个用户id
    private String fromUserAvatarUrl;//开始用户头像地址
    private String fromUserName;//开始用户昵称

    private Long toUserId;//下级用户id(连着)
    private String toUserAvatarUrl;//下级用户头像地址(连着)
    private String toUserName;//下级昵称(连着)

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date createTime;//创建该评论时间
    private String content;//评论内容(标志上下级评论)

    private Long topicId;//主题id
    private String type;//主题类型

    private List<CommentTreeVo> children;//子节点集合(下级评论)

    //无参构造器
    public CommentTreeVo(){

    }

    //评论id和评论内容构造器
    public CommentTreeVo(Long id, String content) {
        this.id = id;
        this.content = content;
    }

}


